from sqlalchemy import create_engine, Column, String, Integer
from sqlalchemy.ext.declarative import declarative_base

db = create_engine('mysql+mysqldb://abc:Abc123..@192.168.88.200:3306/students')
Base = declarative_base()


class Users(Base):
    __tablename__ = "users"

    id = Column(Integer, primary_key=True)
    username = Column(String(20), nullable=False, index=True)
    password = Column(String(64), nullable=False)
    email = Column(String(100), nullable=True, index=True)

    def __repr__(self):
        return "%s(%r)" % (self.__class__.__name__, self.username)


Base.metadata.create_all(db)
# print(db)
